<?php
/**
 * JSON exchange - information about the floor
 */

header("Cache-Control", "no-cache, no-store, must-revalidate");
header("Pragma", "no-cache");
?>
{
    "floorId" : <?php echo $model->id; ?>,
    "floorNumber" : <?php echo $model->floor_number; ?>,
    "buildingId" : <?php echo $model->building->id; ?>,
    "imageUrl" : <?php echo $model->image_url ? '"'.Yii::app()->baseUrl . "/mapmodule/images/" . $model->image_url.'"' : "null"; ?>,
    "rooms" : [
        <?php foreach($model->ruangans as $ruangan) { ?>
        {
            "rx": <?php echo $ruangan->rx; ?>,
            "ry": <?php echo $ruangan->ry; ?>,
            "rw": <?php echo $ruangan->rw; ?>,
            "rh": <?php echo $ruangan->rh; ?>,
            "id": <?php echo $ruangan->id; ?>,
        },
        <?php } ?>
    ]
}